package com.kaishengit.service;

import com.kaishengit.dao.UserDao;
import com.kaishengit.entity.User;

public class UserService {

	private UserDao dao = new UserDao();
	
	public User login(User user){
		User u = dao.findByName(user.getUsername());
		if(u.getPassword().equals(user.getPassword())){
			return u;
		}else{
			return null;
		}
		
	}
}
